package com.qd.pay.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 天府银行对账信息
 *
 * @author sjk
 */
@Getter
@Setter
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("sys_tf_bills")
public class TfBills extends Model<TfBills> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;
    /**
     * 平台交易流水号
     */
    @TableField("transaction_no")
    private String transactionNo;
    /**
     * 服务商号(直连商户号)
     */
    @TableField("partner")
    private String partner;
    /**
     * 特约商户号
     */
    @TableField("subpartner")
    private String subpartner;
    /**
     * 交易金额
     */
    @TableField("total_fee")
    private BigDecimal totalFee;
    /**
     * 商户订单号
     */
    @TableField("out_trade_no")
    private String outTradeNo;
    /**
     * 币种
     */
    @TableField("fee_type")
    private Integer feeType;
    /**
     * 交易状态
     */
    @TableField("trade_state")
    private Integer tradeState;
    /**
     * 交易类型:0001-支付交易  0002 – 退款交易
     */
    @TableField("trade_type")
    private String tradeType;
    /**
     * 平台手续费
     */
    @TableField("platcharge")
    private BigDecimal platcharge;
    /**
     * 特约商户手续费
     */
    @TableField("subplatcharge")
    private BigDecimal subplatcharge;
    /**
     * 清算时间
     */
    @TableField("clear_time")
    private String clearTime;
    /**
     * 交易创建时间
     */
    @TableField("time_start")
    private String timeStart;
    /**
     * 支付完成时间
     */
    @TableField("time_end")
    private String timeEnd;
    /**
     * 通道方流水号
     */
    @TableField("channel_no")
    private String channelNo;
    /**
     * 订单ID
     */
    @TableField("bid")
    private String bid;
    /**
     * 原商户订单号
     */
    @TableField("primary_out_trade_no")
    private String primaryOutTradeNo;

    public void freeData() {
        this.id = null;
        this.transactionNo = null;
        this.partner = null;
        this.subpartner = null;
        this.totalFee = null;
        this.outTradeNo = null;
        this.feeType = null;
        this.tradeState = null;
        this.tradeType = null;
        this.platcharge = null;
        this.subplatcharge = null;
        this.clearTime = null;
        this.timeStart = null;
        this.timeEnd = null;
        this.channelNo = null;
        this.bid = null;
        this.primaryOutTradeNo = null;
    }

}
